import { getCrawlList } from '../../api/crawl.js'
Page({
  data: {
    slideButtons: [],
  },
  onLoad: function () {
    this.setData({
      slideButtons: [{
        text: '普通',
      }, {
        text: '普通',
        extClass: 'test',
      }, {
        type: 'warn',
        text: '警示',
        extClass: 'test',
      }],
    });
    
    getCrawlList({
      lineId: null,
      productName: null,
      supplierName: null
    }).then(res => {
      console.log('res', res)
    }).catch(err=>{
      console.log('err', err)
    })
    // wx.request({
    //   url: 'http://dev.zbycorp.com:18888/wish-gms/v1/offlineProduct/list?id='+1,
    //   data: {
    //     lineId: null,
    //     productName: null,
    //     supplierName: null
    //   },
    //   method: 'POST',
    //   header: {
    //     'content-type': 'application/json', // 默认值
    //     'Authorization': 'Bearer ' + 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1Nzc5OTM2OTksInVzZXJfbmFtZSI6InN5c3RlbSIsImF1dGhvcml0aWVzIjpbIkVSUDpTMTUzIiwiRVJQOkFMTF9HT09EUyIsIkVSUDpTMDk0IiwiRVJQOnN5c3RlbSIsIlpieVByaW5jaXBhbDpleUppWVhOcFkxVnpaWElpT25zaWRYTmxja2xrSWpvNU9Td2lkWE5sY2tOdlpHVWlPaUp6ZVhOMFpXMGlMQ0oxYzJWeVRtRnRaU0k2SW5ONWMzUmxiU0lzSW5CbGNuTnZiazVoYldVaU9pTG5ycUhua0libGtaZ2lMQ0p3WlhKemIyNUpaQ0k2TlRZd0xDSnliMnhsVEdsemRDSTZXM3NpY205c1pVbGtJam94TnpBc0luSnZiR1ZEYjJSbElqb2ljM2x6ZEdWdElpd2ljbTlzWlU1aGJXVWlPaUxrdUpybGlxSGxoYWptbllNaWZTeDdJbkp2YkdWSlpDSTZNamMxTENKeWIyeGxRMjlrWlNJNklsTXdPVFFpTENKeWIyeGxUbUZ0WlNJNklsQkVRZVdGcU9hZGd5SjlMSHNpY205c1pVbGtJam96TXpVc0luSnZiR1ZEYjJSbElqb2lVekUxTXlJc0luSnZiR1ZPWVcxbElqb2lSMDFUNTdPNzU3dWZYK1dGcU9hZGd5SjlMSHNpY205c1pVbGtJam96Tnprc0luSnZiR1ZEYjJSbElqb2lRVXhNWDBkUFQwUlRJaXdpY205c1pVNWhiV1VpT2lMb3RLZmxqN2ZsaGFqbW5ZTWlmVjBzSW1SbGRtbGpaU0k2Ym5Wc2JDd2lhWE5RWkdFaU9tNTFiR3g5ZlE9PSJdLCJqdGkiOiIzNTNjMDMzOS0yZjU3LTRjNTYtODI4ZC1iODcxYzYwNGRmOWMiLCJjbGllbnRfaWQiOiJ6YnktY2xvdWQiLCJzY29wZSI6WyJvcGVuaWQiXX0.AcY5eDL4uJlMILcF9ZencPupbb7s2f5sZ9NGVxWoYH2mTVokS1FnMiJ57ZaQnZbEluyaWlTScOpD-MbRKGktGRY4HAh3m8N_vFV8bxV4yfqXP05M4nWfAi2Dhn308eZkiF5lNL69pB9Ta_KBzR0kcI6YCU98oLL4ZTCrmZVjAh5uZHueiV7sf6qAHJcpvS9Dbnpcd5NYXcY8JNws0p2g_NVAYajKFQkRWN3A8HhrYHHvww-hEYhYWgUYJCHZKT_GGS8gXwWBAoZD57uqf9v1fg-a0UFP3j3TX59vnRAfHyGBVcinWOQ5WEqDQk9ujdMY4dpxS4du60de0kmLEvDoww',
    //   },
    //   success(res) {
    //     console.log(res.data)
    //   }
    // })
  },
  slideButtonTap(e) {
    console.log('slide button tap', e.detail)
  }
});